<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <script type="text/javascript">
        // javascript中支持数据自动转换
        var a = 1;
        var b = true;
        if (a==b){
            alert("相等");
        }
        else {
            alert("不等");
        }

        // 三目运算符
        var c = 10/2>4?5:1;
        alert("c="+c)
    </script>

</body>
</html>